<script setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
const router = useRouter()
const props = defineProps({
    fontFlag:{
        type: Boolean,
        default: false
    },
    title: {
        type:String
    },
    botText:{
        type:String
    },
    isShowRight:{
        type:Boolean,
        default:true
    },
    jumpPath:String,
    isShowLine:{
        type:Boolean,
        default:true
    },
    isDark:Boolean,
    isEn:{
        type:String,
        default:'zhCN'
    }
})
// 获取图片路径资源
const getImageUrl = (name) => {
    return new URL(`../../assets/img/home/${name}`, import.meta.url).href
}
const toPage = ()=>{
    if(props.jumpPath) router.push(props.jumpPath)
}
// 获取图片路径资源
const getImageUrlEarn = (name) => {
    return new URL(`../../assets/img/earn/${name}`, import.meta.url).href
}
</script>

<template>
    <div class="modelTop">
        <div class="nowEggPng">
            <div class="nowEggPngDiv top16">
                <div class="jiantoubox">
                    <div :style="{ color: isDark ? '#fff' : '#282828' }"> {{title}}</div>
                    <img class="jiantou" :src="isDark ? getImageUrl('whitejiantou.png') : getImageUrl('blackjiantou.png')" alt="">
                </div>
                
                <!-- <div  :class="fontFlag ?  'realTime font16' : 'realTime'" style="font-weight: bold;">
                    {{botText?.toUpperCase()}}
                </div> -->
            </div>
            <img :src="getImageUrl('title.png')" alt="">
        </div>
        <div class="more" v-if="isShowRight" @click="toPage" :style="{color: isDark?'#fff':'#282828',background : isDark ? 'unset' : '#fff'}">{{isEn === 'en' ? 'View more' : '查看更多'}}</div>
    </div>
</template>

<style scoped>
.nowEggPngDivP{
    left:81px !important;
    top: 16px !important;
    
}
.font16{
    font-size: 16px !important;
    padding-left: 2px !important;
    padding-top: 2px !important;
}
.realTime{
    font-size: 18px;
    padding-left: 2px;
}
.top16{
    top: 14px !important;
}
.modelTop {
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding-top: 45px;
    align-items: center;
    min-width: 1338px;
    margin: 0 180px;
}
.nwoEggImgW95{
    position: relative;
    width: 515px;
    /* padding-bottom: 20px; */
    display: flex;
    flex-direction: column;
    font-size: 44px;
    /* align-items: center; */
    /* margin-left: 240px; */
}
.nwoEggImgW95 img{
    width: 95px !important;
    height: 100px;
}
.modelTopL {
    display: flex;
    align-items: center;
}
.modelTopL img{
    width: 356px;
}
.modelTopLLine {
    background: #fff;
    width: 4px;
    height: 34px;
    border-radius: 2px;
    margin-right: 15px;
}

.modelTopRText {
    font-size: 32px;
}

.more {
    font-size: 18px;
    border: 1px solid;
    width: 146px;
    height: 54px;
    /* border-radius: 8px; */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: 2px solid #27D698;
}
.nowEggPng{
    position: relative;
    /* width: 356px; */
    display: flex;
    width: 80%;
    flex-direction: column;
    font-size: 44px;
    /* align-items: center; */
    /* margin-left: 240px; */
}

.nowEggPngDiv{
    position: absolute;
    display: flex;
    flex-direction: column;
    left: 76px;
    font-size: 40px;
    top: 10px;
}
.nowEggPng img {
    width: 97px;
}
.jiantoubox{
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.jiantou{
    margin-left: 15px;
    width: 100px !important;
}
@media screen and (max-width:1600px) {
    .nowEggPng{
        margin-left: 55px;
        width: 70%;
    }
    .modelTop{
        width: 93% !important;
        margin-left: 0 !important;
        min-width: unset;
    }
}

</style>
